package com.tudouji.project.harvest.service;

import com.tudouji.framework.web.domain.AjaxResult;
import com.tudouji.project.harvest.domain.Freightorder;
import com.tudouji.project.harvest.domain.FreightorderExport;
import com.tudouji.project.harvest.domain.Qaform;
import com.tudouji.project.quality.domain.Qarecord;

import java.math.BigDecimal;
import java.util.List;

/**
 * 货运单Service接口
 *
 * @author wf
 * @date 2021-01-18
 */
public interface IFreightorderService
{
    /**
     * 查询货运单
     *
     * @param guid 货运单ID
     * @return 货运单
     */
    public Freightorder selectFreightorderDetailById(String guid);
    public Freightorder selectFreightorderDetailByAutoId(Long id);
    /**
     * 查询货运单
     *
     * @param guid 货运单ID
     * @return 货运单
     */
    public Freightorder selectFreightorderById(String guid);

    /**
     * 查询货运单列表
     *
     * @param freightorder 货运单
     * @return 货运单集合
     */
    public List<Freightorder> selectFreightorderList(Freightorder freightorder, String status, String functionType);
    public Freightorder selectFreightorderListSum(Freightorder freightorder, String status, String functionType);

    /**
     * 支付申请单详情
     *
     * @param freightorder 货运单
     * @return 货运单集合
     */
    public List<FreightorderExport> selectFreightorder(FreightorderExport freightorder);

    /**
     * 新增货运单
     *
     * @param freightorder 货运单
     * @return 结果
     */
    public int insertFreightorder(Freightorder freightorder);

    /**
     * 修改货运单
     *
     * @param freightorder 货运单
     * @return 结果
     */
    public int updateFreightorder(Freightorder freightorder);

    /**
     * 批量删除货运单
     *
     * @param guids 需要删除的货运单ID
     * @return 结果
     */
    public int deleteFreightorderByIds(String[] guids);

    /**
     * 删除货运单信息
     *
     * @param guid 货运单ID
     * @return 结果
     */
    public int deleteFreightorderById(String guid);

    AjaxResult exportWhinformExport(String guids);

    AjaxResult approval(Long id, Long taskid, String opinion, String fileIds);
    AjaxResult conformedPriceApproval(Long id, Long taskid, String opinion, String fileIds);

    AjaxResult refuse(Long id, String fileIds, String opinion, Long taskid, Long refuseNodeid, Long backUserid);

    AjaxResult del(Long id);

    AjaxResult save(String param, Long contractid, String remark, Long supplierId, String fileIds, Integer sellformPayType);

    String saveLocation(String param);

    AjaxResult overWeightDT(Long id, Long taskid, String opinion, String fileIds, BigDecimal weight);
    AjaxResult overWeightYS(Long id, Long taskid, String opinion, String fileIds, BigDecimal weight);

    AjaxResult whin(Long id, Long taskid, String opinion, String fileIds, BigDecimal weight, BigDecimal pkgwgh, BigDecimal wghtperpkg, String sthguid);
    AjaxResult whinAuto(Long id, BigDecimal hweight);

    AjaxResult whinBack(Long id, Long taskid, String opinion, String fileIds);

    AjaxResult confirm(Long id, Long taskid, String opinion, String fileIds, Integer refuseFlag, String cartype
            , BigDecimal price, BigDecimal unitPrice);

    AjaxResult quality(Long id, Long taskid, String opinion, String fileIds, Integer refuseFlag/*, BigDecimal unitPrice*/
            , BigDecimal deductRateByHand/*, Qaform qaform*/);

    AjaxResult getQaItems(Long id);

    AjaxResult updateRecord(Qarecord qarecord);

    AjaxResult discharge(Long guid, String param);

    AjaxResult delRecord(String guid);

    AjaxResult conformedPrice(Long id, Long taskid, String opinion, String fileIds, BigDecimal conformedPrice);
}
